package threads;

public class ThreadWork {
    public static void main(String[] args) {
        Runnable printS1=new Greetings("你好",50);
        Runnable printS2=new Greetings("再见",50);

        StudentThread student1=new StudentThread("张三","123");
        StudentThread student2=new StudentThread("李四","345");
        StudentThread student3=new StudentThread("王五","789");
        StudentThread[] students = {student1,student2,student3};
        Runnable printStu = new StudentThread(students);



        Thread thread01=new Thread(printS1);
        Thread thread02=new Thread(printStu);
        Thread thread03=new Thread(printS2);

        thread01.start();
        thread02.start();
        thread03.start();
    }
}
